<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue实例</title>
    <script src='./vue.js'></script>
</head>
<body>

<div id="root">
    <div @click="handleClick">
        {{message}}
    </div>
    <item></item>
</div>

<script>


    Vue.component('item', {
        template: '<div>okok</div>'
    })

    var vm = new Vue({
        el: '#root',
        data: {
            message: 'hello world'
        },
        methods: {
            handleClick: function () {
                alert("hello")
            }
        }
    })
</script>

</body>
</html>